package com.qire.manhua.controller;

import android.view.View;

import com.qire.antsrouter.AntsRouter;
import com.qire.common.constant.Navigation;
import com.qire.common.support.base.EventController;
import com.qire.manhua.activity.TeensLockTimeoutActivity;
import com.qire.manhua.databinding.ActivityTeensLockTimeoutBinding;
import com.qire.manhua.model.viewModel.impl.TeensLockTimeoutViewModel;

import androidx.annotation.NonNull;

public class TeensLockTimeoutController extends EventController<TeensLockTimeoutActivity> {

    private TeensLockTimeoutViewModel viewModel;

    public TeensLockTimeoutController(@NonNull TeensLockTimeoutActivity owner) {
        super(owner);
    }

    @Override
    protected void bindView() {
        ActivityTeensLockTimeoutBinding viewDataBinder = owner.viewDataBinder();
        viewDataBinder.setTeensLockTimeoutController(this);
    }

    @Override
    protected void onCleared() {
        super.onCleared();
        this.viewModel = null;
    }

    public void onAddition(TeensLockTimeoutViewModel viewModel) {
        this.viewModel = viewModel;
    }

    /*************************************************************************************************************************/

    public void verifyBtnOnClick(View view) {
        viewModel.verifyPassword();
    }

    public void forgetPasswordBtnOnClick(View view) {
        AntsRouter.ROUTER.buildCard(Navigation.Page.TeensRetrievePasswordPage).navigation();
    }

}
